package no.capgemini.jzinema.activity.preferences;

import no.capgemini.jzinema.R;
import android.os.Bundle;
import android.preference.CheckBoxPreference;
import android.preference.PreferenceActivity;
import android.preference.PreferenceScreen;

public class PreferencesActivity extends PreferenceActivity {

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);

		CheckBoxPreference showAllMovies = new CheckBoxPreference(getBaseContext());
		showAllMovies.setKey("show_all_movies");
		showAllMovies.setPersistent(true);
		showAllMovies.setDefaultValue(false);
		showAllMovies.setTitle(R.string.show_all_movies);
		showAllMovies.setSummary(R.string.show_all_movies_summary);
		
		
		PreferenceScreen ps = this.getPreferenceManager()
				.createPreferenceScreen(getBaseContext());
		ps.addPreference(showAllMovies);
		this.setPreferenceScreen(ps);
		getPreferenceManager().setSharedPreferencesName("no.capgemini.jzinema_preferences");

	}
}	

